<script>
	$(document).ready(function ()
	{
		$('#data').dataTable( {
			"sPaginationType": "full_numbers"
		});
	});
</script>

<fieldset>
	<div class="products index">
		<h2><?php echo __('Products'); ?></h2>
		<br />
		<div class="newbutton">
			<ul>
				<li><?php echo $this->Html->link(__('Back to product list'), array('action' => 'index')); ?></li>
			</ul>
		</div>
		<br><br>


		<table id="data" class="table" cellpadding="0" cellspacing="0"  border="0">
			<thead>
				<tr>
					<th>Supplier</th>
					<th>Brand</th>
					<th>Range</th>
					<th>Category</th>
					<th>Item</th>
					<th>Size</th>
					<th>Retail Price</th>
					<th>Stock</th>
					<th>Barcode</th>
					<th class="actions"><?php echo __('Actions'); ?></th>
				</tr>
			</thead>

			<tbody>
				<?php foreach ($products as $product): ?>
					<tr>
						<td><?php echo h($product['Suppliers']['supplierName']); ?>&nbsp;</td>
						<td><?php echo h($product['Productsbrand']['name']); ?>&nbsp;</td>  
						<td><?php echo h($product['Productsrange']['name']); ?>&nbsp;</td>  
						<td><?php echo h($product['Productscategory']['name']); ?>&nbsp;</td>  
						<td><?php echo h($product['Product']['description']); ?>&nbsp;</td>
						<td><?php echo h($product['Product']['size']); ?>&nbsp;</td>
						<td><?php echo h($product['Product']['retail_price']); ?>&nbsp;</td>
						<td><?php echo h($product['Product']['onhand_level']); ?>&nbsp;</td>
						<td><?php echo h($product['Product']['barcode']); ?>&nbsp;</td>


						<td class="actions">
							<?php echo $this->Html->link(__('View'), array('action' => 'view', $product['Product']['id'])); ?>
							<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $product['Product']['id'])); ?>
							<?php echo $this->Form->postLink(__('Archive'), array('action' => 'delete', $product['Product']['id']), null, __('Are you sure you want to archive product, %s %s %s %s ?', $product['Productsbrand']['name'],$product['Productsrange']['name'],$product['Productscategory']['name'],$product['Product']['description'])); ?>
						</td>
					</tr>
				<?php endforeach; ?>
			</div>

		</tbody>
	</table>

</div>

</fieldset>           





